﻿<Window x:Class="Waf.DotNetPad.Presentation.Views.InfoWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:p="clr-namespace:Waf.DotNetPad.Presentation.Properties"
        xmlns:dd="clr-namespace:Waf.DotNetPad.Presentation.DesignData"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"  
        mc:Ignorable="d" d:DataContext="{d:DesignInstance dd:SampleInfoViewModel, IsDesignTimeCreatable=True}"
        Title="Info" Icon="{StaticResource DotNetPadIcon}" MinWidth="200" MinHeight="120" 
        SizeToContent="WidthAndHeight" ShowInTaskbar="False" ResizeMode="NoResize">

    <DockPanel>
        <Border DockPanel.Dock="Bottom" Background="{StaticResource DefaultBackground}" Margin="0,11,0,0">
            <Button Content="{x:Static p:Resources.Ok}" IsDefault="True" IsCancel="True" HorizontalAlignment="Center" Width="75" Height="23" Margin="11"/>
        </Border>

        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Image x:Name="applicationImage" Stretch="None" Margin="11,22,11,11"/>

            <Grid Margin="0,0,22,11" VerticalAlignment="Center">
                <Grid.Resources>
                    <Style TargetType="Label">
                        <Setter Property="Margin" Value="6"/>
                    </Style>
                </Grid.Resources>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>

                <Label Content="{x:Static p:Resources.Product}" Grid.Row="0"/>
                <Label Content="{Binding ProductName}" Grid.Column="1"/>

                <Label Content="{x:Static p:Resources.Version}" Grid.Row="1"/>
                <Label Content="{Binding Version}" Grid.Column="1" Grid.Row="1"/>

                <Label Content="{x:Static p:Resources.License}" Grid.Row="2"/>
                <Label Grid.Column="1" Grid.Row="2">
                    <Hyperlink Command="{Binding ShowWebsiteCommand}" CommandParameter="http://dotnetpad.codeplex.com/license">The MIT License (MIT)</Hyperlink>
                </Label>

                <Label Content="{x:Static p:Resources.Website}" Grid.Row="3"/>
                <Label Grid.Column="1" Grid.Row="3">
                    <Hyperlink Command="{Binding ShowWebsiteCommand}" CommandParameter="http://dotnetpad.codeplex.com">http://dotnetpad.codeplex.com</Hyperlink>
                </Label>

                <Label Content="{x:Static p:Resources.OperatingSystem}" Grid.Row="4"/>
                <Label Content="{Binding OSVersion}" Grid.Column="1" Grid.Row="4"/>

                <Label Content="{x:Static p:Resources.NetFramework}" Grid.Row="5"/>
                <Label Grid.Column="1" Grid.Row="5">
                    <TextBlock>
                        <Run Text="{Binding NetVersion, Mode=OneWay}"/>
                        <Run>
                            <Run.Style>
                                <Style TargetType="Run">
                                    <Setter Property="Text" Value="{x:Static p:Resources.Info32Bit}"/>
                                    <Style.Triggers>
                                        <DataTrigger Binding="{Binding Is64BitProcess}" Value="True">
                                            <Setter Property="Text" Value="{x:Static p:Resources.Info64Bit}"/>
                                        </DataTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Run.Style>
                        </Run>
                    </TextBlock>
                </Label>
            </Grid>
        </StackPanel>
    </DockPanel>
</Window>
